{% extends "videocapture/root.html" %}
{% load i18n %}

{% block title %}{% trans "Latest Videos" %}{% endblock %}

{% block content %}

    <div class="row col-lg-12">
        <h1 class="page-header">{% trans "Latest Videos" %}</h1>
    </div>
    
    <hr>

	<div class="row">
		<aside class="col-md-2" style="background-color: turquoise;">

			<h4>{% trans "Filter by Year" %}</h4>
			<ul>
			{% for date in date_list %}
				<li><a href="{% url 'videocapture:video-archive-year' date.year %}">{{ date|date:"Y" }}</a></li>
			{% endfor %}
			</ul>
		</aside>

		<main class="col-md-10">
			
			{% if latest %}
			    {% for video in latest %}
                    <h1><a href="{{video.get_watch_video_url}}">{{video.title}}</a></h1>
                    <i>Filmed on {{video.dateFilmed}}</i>
			        <a href="{{ video.get_watch_video_url }}">
			             <img width="300" height="150" src="{{ video.get_thumbnail_url }}" class="thumbnail" alt="{{ video.title }}">
			        </a>
                    <hr>
			    {% endfor %}
			{% else %}
				<p>{% trans "No videos were found" %}.</p>
			{% endif %}

		</main>

	</div>

{% endblock %}


